package com.woniuxy02;

import java.util.Scanner;

/**
 * @author 作者
 * @create 2025-10-24 15:51
 */
public class Test06 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入第几个元素");
        int num=scanner.nextInt();
        int[] a=new int[num];
        if(num==1 || num==2){
            System.out.println(1);
        }else{
            a[0]=1;
            a[1]=1;
            for(int i=2;i<num;i++){
                a[i]=a[i-1]+a[i-2];
            }
            System.out.println(a[num-1]);
        }
    }
}
